<?php
    $output = "tam%20ly";
    $output = preg_replace('/[^(\x20-\x7F)]*/','', $output);
    echo($output);
?>